
<script language="javascript">

$(function(){
		   
	$('#formLogin').ajaxForm({
		dataType: 'json',
		beforeSubmit: function() {
			if( $("#txtUser").val() == "" || $("#txtPass").val() == "" ){
				alert("Preencha os dados corretamente!!")
				return false;
			}
		},
		success: function(responseText, statusText) {
			if(responseText.sucesso){
				alert(responseText.mensagem);
				document.formLogin.reset();
				window.location = "/?pg=home";
			}else{
				alert(responseText.mensagem);
			}
		}

	})
})	

</script>


<style>
.small{
	height:20px;
	clear:left; 
	margin-left:280px; 
	font-size:10px; 
	font-family: Tahoma, Geneva, sans-serif;
	text-decoration:none;
	color:#AAE3FF;
	}
.small a:link{
	color:#AAE3FF;
}
.small a:visited{
	color:#AAE3FF;
}
.small a:hover{
	color:#889DD4;
	font-size:11px;
}
</style>
	
</head>
<body>

<form action="actions/loginAction.php" method="post" style="background:url(../images/PanelBasBag.png) no-repeat; width:614px; height:363px;" id="formLogin" name="formLogin">
	<br /><br /><br /><br /><br /><br /><br />
				<div class="rowElem">
			<label>Cidade:</label>
			<select name="select2" >
				<option value="">Escolha sua Cidade</option>
				<option value="1">Uberlândia</option>
			</select>
		</div>
        		<div class="rowElem">
			<label>ID Escola:</label>
			<input type="text" id="txtIdEscola" name="txtIdEscola"/>
		</div>
		<div class="rowElem">
		  <label for="login">Usu&aacute;rio:</label><input type="text" id="txtUser" name="txtUser"/>
		  <div class="small"> <a href="#" style="text-decoration:none;"> Ainda n&atilde;o tenho cadastro </a> </div></div>
		<div class="rowElem"><label for="senha">Senha:</label><input type="password" id="txtPass" name="txtPass"/><div class="small"> <a href="#" style="text-decoration:none;"> Esqueci a minha senha </a> </div></div>
	 	<div class="buttom"><input type="submit" id="btnEntrar" value="<b>OK</b>" /> &nbsp; <input type="reset" value="<b>Sair</b>" /></div>
				
	</form>
</body>
</html>